package main

import (
	"fmt"
	"ssims/dao"
	"ssims/pkg/gredis"
	"ssims/pkg/setting"
	"ssims/routers"
)

//pg数据库初始化，gedis初始化
func init() {
	setting.Setup()
	dao.Setup()
	gredis.Setup()
}

//主函数入口
func main() {
	endPoint := fmt.Sprintf(":%d", setting.ServerSetting.HttpPort)
	routersInit := routers.InitRouter()
	routersInit.Run(endPoint) //开启监听
}
